import req from '@/api/http.js'

/** 需求决策—保存任务筹划 */
export const SavePlanTasks = data => req('post', '/ybgl/gcxq/save', data)
/** 获取任务列表 */
export const GetPlanTasksList = data => req('get', '/ybgl/gcxq/page', data)
/** 删除任务列表 */
export const DeletePlanTasks = data => req('post', '/ybgl/gcxq/remove', data)
/** 获取列表详情 */
export const GetPlanTasksDetail = id =>
  req('get', `/ybgl/gcxq/detail?id=${id}`, id)
/** 修改任务 */
export const UpdatePlanTasks = data => req('post', '/ybgl/gcxq/update', data)

/** 导出需求决策列表 */
export const ExportPlanTasks = params =>
  req('get', '/ybgl/gcxq/export', params, 'blob')

/** 调用智能决策 */
export const CallIntelligentDecision = data =>
  req('post', '/ybgl/jcmx/chooseTrainingJcmx', data)

/** 需求录入-筹划算法 */
export const GetPlanAlgorithm = data => req('post', '/ybgl/jcmx/useChmx', data)
/** 调用生成任务方案 */
export const CallGenerateTaskScheme = data =>
  req('post', '/ybgl/jcmx/useRwgh/rwfa', data)
